﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="rptPesertaList.aspx.cs" Inherits="Training.Web.Reports.rptPesertaList"
    EnableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="Server">
    <script type="text/javascript">

        $(document).ready(function () {
            $('#<%= ddlCabang.ClientID %>').chosen({ placeholder_text_single: "-- semua cabang --" });
            $('#<%= ddlLokasi.ClientID %>').chosen({ placeholder_text_single: "-- semua lokasi --" });


            //            $('#<%= ddlCabang.ClientID %>').change(function () {
            //                var handlerUrl = '<%= ResolveUrl("~/AjaxHandler/Loaddata/Administration/catalog/LokasiLoadHandler.ashx") %>';


            //                var cabangID = $("#<%= ddlCabang.ClientID %> option:selected").val();
            //                if (cabangID != "") {
            //                    var $ddlLokasi = $('#<%= ddlLokasi.ClientID %>');
            //                    $('#<%= ddlLokasi.ClientID %>').find('option:not(:first)').remove();

            //                    $.ajax({
            //                        type: 'POST',
            //                        url: handlerUrl + "?method=getbycabang&cabangID=" + cabangID,
            //                        contentType: 'application/json',
            //                        dataType: 'json',
            //                        success: function (datas) {
            //                            $ddlLokasi.get(0).options[0] = new Option("-- semua lokasi --", "");
            //                            $.each(datas, function (i, data) {
            //                                $ddlLokasi.append('<option value="' + data.LokasiID + '">' + data.NamaLokasi + '</option>');
            //                            });
            //                            $ddlLokasi.trigger('chosen:updated');
            //                        },
            //                        error: function () {
            //                            $.msgBox("Error load lokasi  !", null, { title: "Pesan Error" });
            //                        }
            //                    });

            //                }
            //                else {
            //                    //$("select##ddlNIK").prop('selectedIndex', 0);
            //                    //$("select##ddlLokasi").prop('selectedIndex', 0);
            //                }
            //            });
        });

    </script>
    <div class="page-full-width cf">
        <div class="content-module">
            <%-- <div class="content-module-heading cf">
                <h3 class="fl">
                    Laporan Peserta</h3>
                <span class="fr expand-collapse-text">Click to collapse</span> <span class="fr expand-collapse-text initial-expand">
                    Click to expand</span>
            </div>--%>
            <!-- end content-module-heading -->
            <br />
            <table border="0">
                <tr>
                    <td style="padding-right: 30px">
                        Cabang
                    </td>
                    <td style="padding-right: 30px">
                        :
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCabang" runat="server" AutoPostBack="false" Width="400"
                            OnSelectedIndexChanged="ddlCabang_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr runat="server" visible="false">
                    <td style="padding-right: 30px">
                        Lokasi
                    </td>
                    <td style="padding-right: 30px">
                        :
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlLokasi" runat="server" Width="400">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="3">
                        <asp:Button ID="btnProses" runat="server" CssClass="buttonPrint" Text="Proses" OnClick="btnProses_Click" />
                    </td>
                </tr>
            </table>
            <div class="content-module-main">
                <asp:ScriptManager ID="scManager" runat="server" EnablePartialRendering="true">
                </asp:ScriptManager>
                <rsweb:ReportViewer ID="rsViewer" runat="server" Height="100%" Width="100%" SizeToReportContent="true">
                </rsweb:ReportViewer>
            </div>
            <!-- end content-module-main -->
        </div>
    </div>
</asp:Content>
